import request from '@/utils/request'
import { getToken, TokenKey } from '@/utils/auth'
//泊位二维码列表
export function fetchList(query) {
  return request({
    url: '/berthQrcode/list',
    method: 'post',
    data: query
  })
}

// 创建泊位二维码
export function berthQrcodeAdd(data) {
  return request({
    url: '/berthQrcode/create',
    method: 'post',
    data
  })
}

// 解绑泊位
export function unbindBerth(data) {
  return request({
    url: `/berthQrcode/unbindBerth`,
    method: 'post',
    data
  })
}

// 绑定泊位
export function bindBerth(data) {
  return request({
    url: `/berthQrcode/bindBerth`,
    method: 'post',
    data
  })
}

//泊位二维码导出列表
export function exportList(query) {
  return request({
    url: '/berthQrcode/export/list',
    method: 'post',
    data: query
  })
}

// 导出
export function berthQrcodeExport(data) {
  return request({
    url: `/berthQrcode/export`,
    method: 'post',
    data
  })
}